package com.ChenYaRou.www.dao;

import com.ChenYaRou.www.po.Street;

import java.sql.SQLException;
import java.util.List;

/**
 * @author 86183
 */
public interface StreetDao {
    /**
     * 查找街区集合
     * @param street 仅赋值条件的街区
     * @return 街区集合
     * @throws IllegalAccessException
     * @throws SQLException
     * @throws NoSuchFieldException
     * @throws InstantiationException
     */
    List<Street> select(Street street) throws IllegalAccessException,
            SQLException, NoSuchFieldException, InstantiationException;

    /**
     * update street
     * @param newStreet street需要更新的值
     * @param  oldStreet old street
     * @return 成功与否
     * @throws IllegalAccessException
     * @throws SQLException
     */
    int update(Street newStreet,Street oldStreet) throws IllegalAccessException, SQLException;
    /**
     * 插入street
     * @param street 新street
     * @return 更新条数
     * @throws IllegalAccessException
     * @throws SQLException
     */
    int insert(Street street) throws IllegalAccessException, SQLException;

}
